<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1.0">
		<title>Document</title>
		<link rel="stylesheet" type="text/css" href="../css/login.css">
	</head>
	<body>
		<header class="center">登陆</header>
		<div class="land">
			<p>欢迎来到美游！</p>
			<input type="text" name="" placeholder="请输入手机号">
			<input type="text" name="" placeholder="输入登陆密码">
			<div class="confirm center">确定</div>
			<div class="flex forget">
				<a href="forget.html">忘记密码</a>
				<a href="register.html">注册</a>
			</div>
			<div class="th-land center">
				<span>第三方登录</span>
			</div>
			<div class="center">
				<img src="../img/zfb.png">
				<img src="../img/wx.png">
			</div>
			<p class="agreement center">登录即表示你已阅读并同意<a href="#">注册协议</a></p>
		</div>
<<<<<<< HEAD
		<button onclick="aa()" >点我视频聊天</button>

    <script type="text/javascript">
      function aa(){
    	  window.Android.goVideoChat()
      }
    </script>
		<script>

		 
		var weidu = "";
		var jindu = "";
	
		    //调用高德第三方接口获取经纬度  
		                     var map, geolocation;
                //加载地图，调用浏览器定位服务
                 map = new AMap.Map('', {
                    resizeEnable: true
                }); 
                map.plugin('AMap.Geolocation', function() {
                    geolocation = new AMap.Geolocation({
                        enableHighAccuracy: true, //是否使用高精度定位，默认:true
                        timeout: 10000, //超过10秒后停止定位，默认：无穷大
                        buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量，默认：Pixel(10, 20)
                        zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见，默认：false
                        buttonPosition: 'RB'
                    });
                    map.addControl(geolocation);
                    geolocation.getCurrentPosition();
                    AMap.event.addListener(geolocation, 'complete', onComplete); //返回定位信息
                    AMap.event.addListener(geolocation, 'error', onError); //返回定位出错信息
                }); 
                //解析定位结果
                function onComplete(data) {
                	console.log(data);
                    weidu = data.position.getLat();   //纬度 
                    jindu = data.position.getLng();    //经度 
                    alert(weidu+","+jindu);
                }

                //解析定位错误信息
                function onError(data) {
                    alert("定位失败");
                }
                
                $("#login").click(function(){
                	var phone = $("#phone").val();
                	var password = $("#password").val();
                	$.ajax({
                		url:"/meiyou/loginByphonepwd",
                		type:"POST",
                		data:"phone="+phone+"&pwd="+password+"&jindu="+jindu+"&weidu="+weidu,
                		success:function(data){
                			console.log(data);
                			if(data.code==100){
                				//缓存信息
                				var user = data.extend.user;
                				localStorage.setItem("uId",user.uId);
                				localStorage.setItem("uPhone",user.uPhone);
                				window.location.href="../index.html";
                			}else{
                				alert("账号密码错误，请重新登录");
                			}
                		}
                	});
                });
		</script>

=======
>>>>>>> branch 'master' of https://gitee.com/xiejun123/Meiyou.git
	</body>
</html>
